package j2se.动态代理实现;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Created by jingqing.zhou on 2015/5/7.
 */
public class ProxyObject implements InvocationHandler {

    public Object getTargetObject() {
        return targetObject;
    }

    public void setTargetObject(Object targetObject) {
        this.targetObject = targetObject;
    }

    public Object targetObject;
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        return method.invoke(targetObject,args);
    }
}
